-module(p7).
-export([main/3]).

main([], _BigN, Divisors) -> Divisors;
main([SmPrime | Primes]=Z, BigN, Divisors) ->
    case BigN rem SmPrime =:= 0 of
        true -> main(Z, BigN div SmPrime, [SmPrime | Divisors]);
        false -> main(Primes, BigN, Divisors)
    end.
    
